<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"

      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"

      >
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="../Master/adminMaster.xhtml">
            <ui:define name="page-content">
                <section class="grid_12" id="dashtabs">
                    <div class="box-header">
                        Status Report
                        <ul class="controls"></ul>
                    </div>
                    <div id="dashtabs-pages" class="box-content no-padding">
                        <h:form>
<!--                            <div style="background-color: #cccccc;height: 20px;padding: 4px;font-size: 13px;margin-bottom: 6px;color: black;font-weight: bold">
                                Generate the reports by 
                            </div>-->
                            <div style="padding: 6px;margin-bottom: 13px">
                                <span style="margin-right: 15px;font-weight: bold;font-size: 13px">Daily</span>&nbsp;<p:calendar value="#{statusReportBean.daily}" showButtonPanel="true" navigator="true" />&nbsp;&nbsp;&nbsp;&nbsp;<h:commandButton action="#{statusReportBean.statusReportByDaily()}" value="Generate Report" styleClass="button"></h:commandButton>
                            </div>
                            <div style="padding: 6px;margin-bottom: 13px">
                                <span style="margin-right: 15px;font-weight: bold;font-size: 13px">From</span><p:calendar value="#{statusReportBean.fromWeekly}" showButtonPanel="true" navigator="true" />&nbsp;&nbsp;&nbsp;&nbsp; <span style="margin-right: 15px;font-weight: bold;font-size: 13px">To</span><p:calendar value="#{statusReportBean.toWeekly}"  showButtonPanel="true" navigator="true"/>&nbsp;&nbsp;&nbsp;&nbsp;<h:commandButton action="#{statusReportBean.statusReportByWeekly()}" value="Generate Report" styleClass="button"></h:commandButton>
                            </div>

                            <p:dataTable var="temp" value="#{statusReportBean.statusReport}"  paginator="true" rows="10"  
                                         emptyMessage="No complaints found with given criteria" styleClass="table no-border"
                                         filteredValue="#{statusReportBean.filteredReport}" paginatorPosition="bottom">  
                                <f:facet name="header">  
                                    <span style="float: left">Status Report #{statusReportBean.flag1}</span>
                                </f:facet>  

                                <p:column headerText="Title" sortBy="#{temp.title}" filterBy="#{temp.title}"  filterMatchMode="contains">  
                                    #{temp.title}  
                                </p:column>  
                                <p:column headerText="Creator" sortBy="#{temp.creator.membersName}" filterBy="#{temp.creator.membersName}"  filterMatchMode="contains">  
                                    #{temp.creator.membersName}
                                </p:column> 
                                <p:column headerText="Solver" sortBy="#{temp.solver.membersName}" filterBy="#{temp.solver.membersName}"  filterMatchMode="contains">  
                                    #{temp.solver.membersName}
                                </p:column> 
                                <p:column headerText="Priority" sortBy="#{temp.priority}" filterBy="#{temp.priority}"  filterMatchMode="contains">  
                                    #{temp.priority}
                                </p:column> 
                                <p:column headerText="Pending(Day)" sortBy="#{temp.timeSolved}" filterBy="#{temp.timeSolved}"  filterMatchMode="contains" style="text-align: center">  
                                    #{temp.timeSolved} Days
                                </p:column> 
                            </p:dataTable> 
                        </h:form>
                    </div>

                </section>
                <br class="cl" />
            </ui:define>
        </ui:composition>
    </h:body>
</html>

